﻿<%@ Page Title="View Members Page" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master"
    CodeBehind="ViewAllUsers.aspx.vb" Inherits="BeachesInGreeceComplete.ViewAllUsers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="aside2">
        <br />
        <h3>
            Search</h3>
        <br />
        <br />
        <asp:TextBox ID="tb_search" runat="server" />
        <br />
        <br />
        <asp:Button ID="btn_findByName" runat="server" Text="By Name" CssClass="m-btn blue" />
        <asp:Button ID="btn_findByRegion" runat="server" Text="By UserName" CssClass="m-btn blue" />
        <br />
        <br />
        <h3>
            Member Rules</h3>
        <div class="JustifiedMembers">
            <br />
            When a members registers becomes a "Swimmer".
            <br />
            A "Swimmer" can:
            <ul>
                <li>Add a Beach</li>
                <li>Add an Event</li>
                <li>Add a SandCastle (1 per User)</li>
            </ul>
            When a "Swimmer" adds 20 beaches, becomes a "Tourist.
            <br />
            A "Tourist" can also:
            <ul>
                <li>Add an Album( Max 1 with 4 pictures)</li>
            </ul>
            When a "Tourist" adds 40 beaches becomes a "Greece Lover".<br />
            A "Greece Lover" can:
            <ul>
                <li>Add up to 5 albums with 8 pictures</li>
            </ul>
        </div>
    </div>
    <h2>
        All Members</h2>
    <div class="mainDiv2">
        <asp:ListView ID="ListView2" runat="server" DataKeyNames="ID" DataSourceID="SqlDataSource2">
            <ItemTemplate>
                <li style="">
                    <asp:Label ID="lbl_Name" CssClass="BeachNameLabel" runat="server" Text='<%# Eval("Tourist") %>' />
                    <br />
                    <asp:Label ID="lbl_Time" CssClass="RegionLabel" runat="server" Text='<%# CalculateTime.calculateTimeNoHours(Eval("DateCreated")) %>' />
                    <br />
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("Tourist", "Profile.aspx?Tourist={0}") %>'>
                        <img src='<%# Eval("Picture") %>'  alt="No picture found"  width="100" height="100" style="border-style: solid; border-width: small" />
                    </asp:HyperLink>
                    <br />
                    <asp:Label ID="TouristLabel" CssClass="RegionLabel" runat="server" Text='<%# Eval("FirstName") %>' />
                    <br />
                    <asp:Label ID="Label1" CssClass="BeachNameLabel" runat="server" Text='<%# Eval("LastName") %>' />
                </li>
            </ItemTemplate>
            <LayoutTemplate>
                <ul class="ItemContainer">
                    <li runat="server" id="itemPlaceholder" />
                </ul>
            </LayoutTemplate>
        </asp:ListView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:BeachConnectionString %>"
            ProviderName="<%$ ConnectionStrings:BeachConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [Profiles] ORDER BY ID DESC">
        </asp:SqlDataSource>
        <div class="nextLine">
            <asp:DataPager ID="DataPagerProfiles" runat="server" PagedControlID="ListView2" PageSize="12"
                Visible="False">
                <Fields>
                    <asp:NextPreviousPagerField ShowFirstPageButton="True" ShowNextPageButton="False"
                        ButtonType="Link" ButtonCssClass="buttonDataPage" />
                    <asp:NumericPagerField ButtonType="Link" />
                    <asp:NextPreviousPagerField ShowLastPageButton="True" ShowPreviousPageButton="False"
                        ButtonType="Link" ButtonCssClass="buttonDataPage" />
                </Fields>
            </asp:DataPager>
            <br />
        </div>
        <br />
    </div>
</asp:Content>
